<?php
$products=array('Tires','Oil','Spark Plugs');
$prices['Tires']=500;
$prices['Oil']=120;
$prices['Spark Plugs']=20;

/*while($element = each($prices)){
	echo "key=".$element['key'];
	echo "-";
	echo  "value=".$element['value'];
	echo "<br/>";
	}
	echo "<br/>";*/
	
	while($element = each($prices)){
		echo $element['key'];
		echo "-";
		echo $element['value'];
		echo "<br/>";
	}
	echo "<br/>";
	/*
	for ($i=0; $i<3; $i++){
		echo $products[$i];
		$j=$products[$i];
		echo "-";
		echo $prices[$j];
		echo "<br/>";
}*/

$categories=array(array(array('CAR_TIR','Tires',500),
												array('CAR_OIL','Oil',120),
												array('CAR_SPK','Spark Plugs',20)
												),
									array(array('VAN_TIR','Tires',800),
												array('VAN_OIL','Oil',220),
												array('VAN_SPK','Spark Plugs',40)
												),
									array(array('TRK_TIR','Tires',1500),
												array('TRK_OIL','Oil',320),
												array('TRK_SPK','Spark Plugs',80)
		)
		
		);


for($layer=0; $layer<3;$layer++){
	echo "Layer $layer<br/>";
	for($row=0;$row<3;$row++){
		
		for($column=0;$column<3;$column++){
			
			echo '|' .$categories[$layer][$row][$column];
		}
		echo '|<br/';
	}
}
?>